﻿<style type="text/css">
<!--
#ajaxWrapper{margin:0px auto;width:450px;float:left;}
#revision_info{margin:0px auto;width:200px;float:right;}
-->
</style>

<h1>文章明细表</h1>
    <style type="text/css" media="all">
        #revision_info {
            float: right;
            width: 43%;
        }

        #articles_list {
            float: left;
            width: 55%;
        }
</style>
<div id="flash"> 
    <% if flash[:notice] -%>
        <div id="notice"> <%= flash[:notice] %></div>
    <% end -%>
</div>      
  &nbsp;&nbsp;&nbsp;&nbsp;<%= button_to '新增文章', :action => 'new' %>
  <% form_remote_tag(:url =>{:action =>'search'},
                      :before => "Element.show('spinner');",
                      :complete  => "Element.hide('spinner')",
                      :update =>'ajaxWrapper') do %>
  <!--[form:searching]-->
  <label for="from">收稿日期从</label>
  <%= text_field_tag :startdate, params[:startdate], :size=>10 %>
  <img src="../images/img.gif" id="f_trigger_startdate"
       style="cursor: pointer; border: 1px solid red;"
       title="Date selector"
       onmouseover="this.style.background='red';"
       onmouseout="this.style.background=''" />
  <script type="text/javascript">
      Calendar.setup({
          inputField     :    "startdate",
          ifFormat       :    "%Y-%m-%d",
          button         :    "f_trigger_startdate",
          align          :    "Tl",
          singleClick    :    true
      });
  </script>

  <label for="to">至</label>
  <%= text_field_tag :enddate, params[:enddate], :size=>10  %>
  <img src="../images/img.gif" id="f_trigger_enddate"
       style="cursor: pointer; border: 1px solid red;"
       title="Date selector"
       onmouseover="this.style.background='red';"
       onmouseout="this.style.background=''" />
  <script type="text/javascript">
      Calendar.setup({
          inputField     :    "enddate",
          ifFormat       :    "%Y-%m-%d",
          button         :    "f_trigger_enddate",
          align          :    "Tl",
          singleClick    :    true
      });
  </script>

  <!--[eoform:article]-->

    <%= submit_tag '查询' -%> 
  <%= image_tag '../images/spinner.gif', :id=> 'spinner', :style=>"display:none;flot:right;" %>
  <% end -%>
<div  id='ajaxWrapper'>
    <%= render(:partial =>"search", :object => @articles, :layout=>false)%>
</div>
<div  id="revision_info">
    <%= render(:partial =>"revision_list",:layout=>false)%>
</div>
